function formatterNumber(val,value2=2){
    if(val !=0){
        return parseFloat(val).toFixed(value2);
    }
    return 0;
}




var setPagination = function(id, total, pages,epage,callback) {
    if(pages >1){
        $("#"+id).pagination(total, {
            callback: callback,
            prev_text: "上一页",
            next_text: "下一页",
            items_per_page: epage,
            link_to:"javascrpt:void(0);",
            num_display_entries: 5,
            current_page: parseInt(pages)-1,
            num_edge_entries: 2,
            load_first_page:false
        });
    }else{
        $("#"+id).pagination(total, {
            callback: callback,
            prev_text: "上一页",
            next_text: "下一页",
            items_per_page: epage,
            link_to:"javascrpt:void(0);",
            num_display_entries: 5,
            current_page: parseInt(pages)-1,
            num_edge_entries: 2,
            load_first_page:false,
            prev_show_always:false,
            next_show_always:false
        });
    }
    /*$("#"+id).prepend("<div class='total'>总记录数:"+total+"</div>");*/
};

